import axios from '@/libs/api.request'

export const tenantList = (data) => {
  return axios.request({
    url: '/queryTenant',
    data,
    method: 'post'
  })
}

/**
 * 云仓库列表
 * */
export const entrepotList = (data) => {
  return axios.request({
    url: '/sysDepotList',
    data,
    method: 'post'
  })
}

/**
 * 新增租户
 * */
export const addTenant = (data) => {
  return axios.request({
    url: '/addTenant',
    data,
    method: 'post'
  })
}

/**
 * 获取租户信息
 * */
export const getTenant = (data) => {
  return axios.request({
    url: `/updTenantPage/${data}`,
    method: 'post'
  })
}

/**
 * 修改租户信息
 * */
export const amendTenant = (data) => {
  return axios.request({
    url: '/updTenant',
    data,
    method: 'post'
  })
}

/**
 *  获取续费列表
 * */
export const getPay = (data) => {
  return axios.request({
    url: '/queryTenantPay',
    data,
    method: 'post'
  })
}

/**
 *  获取续费用户信息
 * */
export const getUserPay = (data) => {
  return axios.request({
    url: `/payTenantPage/${data}`,
    method: 'post'
  })
}

/**
 * 续费
 * */
export const postPayTenant = (data) => {
  return axios.request({
    url: '/payTenant',
    data,
    method: 'post'
  })
}

/**
 * 获取 Mac list
 * */
export const getMacList = data => {
  return axios.request({
    url: '/queryTenantMac',
    data,
    method: 'post'
  })
}

/**
 * 新增Mac地址
 * */
export const postNewMac = (data) => {
  return axios.request({
    url: `/addTenantMac`,
    data,
    method: 'post'
  })
}

/**
 * 禁用启用Mac地址接口
 * */
export const amendMacState = (data) => {
  return axios.request({
    url: `/setStatusTenantMac/${data}`,
    method: 'post'
  })
}

/**
 * 禁用启用Mac地址接口
 * */
export const postResetPwd = (data) => {
  return axios.request({
    url: `/resetPass/${data}`,
    method: 'post'
  })
}
